﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HCQ2_Model.Data;

namespace HCQ2_Model.Pay
{
    /// <summary>
    /// 订单列表
    /// </summary>
    public class OrderListModel : IOrderID, IParentOrderID
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderCode { get; set; }
        /// <summary>
        /// 父订单号
        /// </summary>
        public string ParentOrderCode { get; set; }

        /// <summary>
        /// 产品类别;1(VRPPT)、2(创客)、3(头记)、4（校史馆）
        /// </summary>
        /// 2020-4-1,谭在群里提的需求，此字段改用string类型，直接返回处理后的中文
        //public Nullable<int> ProType { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// 作者
        /// </summary>
        public string CreateFileUser { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public string OrderCreateTime { get; set; }
        /// <summary>
        /// 购买人
        /// </summary>
        public string OrderCreateUser { get; set; }
        /// <summary>
        /// 购买期限;1(1个月)、3(3个月)、6(6个月)、12(一年)
        /// </summary>
        public Nullable<int> PurchasePeriod { get; set; }
        /// <summary>
        /// 商品金额
        /// </summary>
        public decimal CommodityMoney { get; set; }
        /// <summary>
        /// 折后金额
        /// </summary>
        public decimal DiscountMoney { get; set; }
        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal PreferentialAmount { get; set; }
        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal PaymentAmount { get; set; }
        /// <summary>
        /// 付款方式;1(金币)、2(微信)、3(支付宝)
        /// </summary>
        public Nullable<int> PaymentMethod { get; set; }
        /// <summary>
        /// 付款时间
        /// </summary>
        public string PaymentTime { get; set; }
        /// <summary>
        /// 确认时间
        /// </summary>
        public string ConfirmTime { get; set; }
        /// <summary>
        /// 截止时间
        /// </summary>
        public string EndTime { get; set; }
        /// <summary>
        /// 订单状态;1(等待买家付款)、(2买家已付款)、4(交易成功)、5(交易关闭)、6(退款中)
        /// </summary>
        /// <remarks>
        /// 20191112;老谭说去掉3(卖家已确认)
        /// </remarks>
        public Nullable<int> OrderState { get; set; }
        /// <summary>
        /// 订单来源;pc、web、mobile、wechat
        /// </summary>
        public string OrderSource { get; set; }
        /// <summary>
        /// 支付流水号
        /// </summary>
        public string PaymentCode { get; set; }
        /// <summary>
        /// 提单人
        /// </summary>
        public string OrderSubmitUser { get; set; }

        /*2020-4-1,谭在群里提的需求，增加如下字段返回*/

        /// <summary>
        /// 商品ID
        /// </summary>
        public int? CommodityId { get; set; }
        /// <summary>
        /// 文件略缩图地址
        /// </summary>
        public string FileImgUrl { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        public string AliasName { get; set; }

        /// <summary>
        /// 权限
        /// </summary>
        public string FolderLimit { get; set; }
        /// <summary>
        /// 简介
        /// </summary>
        public string FileNote { get; set; }
        /// <summary>
        /// 产品类别
        /// </summary>
        public string ProType { get; set; }
        /// <summary>
        /// 商品来源；0个人、1自营
        /// </summary>
        public int? SupplyType { get; set; }
        /// <summary>
        /// 商品类别
        /// </summary>
        public string PageType { get; set; }
        /// <summary>
        /// 格式
        /// </summary>
        public string Format { get; set; }
        /// <summary>
        /// 审核通过时间
        /// </summary>
        public string ApproveTime { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTime { get; set; }
        /// <summary>
        /// 文件大小
        /// </summary>
        public string FileSize { get; set; }

        #region 需求《2021-9-14：添加需求《VLions需求规格_度度圈接口需求_订单及购物车-202100909.docx》的相关内容》添加的内容

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 店铺ID
        /// </summary>
        public int StoreID { get; set; }

        /// <summary>
        /// 店铺名称
        /// </summary>
        public string StoreName { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 收货人电话
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 所在地区
        /// </summary>
        public string Area { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 桌号
        /// </summary>
        public string TableNum { get; set; }

        /// <summary>
        /// 备货状态
        /// </summary>
        public int StorageStatus { get; set; }

        /// <summary>
        /// 包装类别，0=堂食，1=打包
        /// </summary>
        public int PackType { get; set; }


        #endregion

        /// <summary>
        /// 规格列表
        /// <br/>
        /// 2021-9-16：禅道173号需求添加
        /// </summary>
        public List<SpecParamModel> Specs { get; set; } = new List<SpecParamModel>();

        /// <summary>
        /// 商品单价
        /// </summary>
        public decimal? UnitPrice { get; set; }
    }

    /// <summary>
    /// 订单列表PC后台使用
    /// </summary>
    /// 添加原因：由于OrderListModel类，接口也使用了并且修改《2020-4-1,谭在群里提的需求》时修改了一些内容跟后台冲突，所以重新加的
    public class OrderListPCModel : IOrderID, IParentOrderID
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderCode { get; set; }
        /// <summary>
        /// 父订单号
        /// </summary>
        public string ParentOrderCode { get; set; }

        /// <summary>
        /// 产品类别;1(VRPPT)、2(创客)、3(头记)、4（校史馆）
        /// </summary>
        public Nullable<int> ProType { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// 作者
        /// </summary>
        public string CreateFileUser { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public string OrderCreateTime { get; set; }
        /// <summary>
        /// 购买人
        /// </summary>
        public string OrderCreateUser { get; set; }
        /// <summary>
        /// 购买期限;1(1个月)、3(3个月)、6(6个月)、12(一年)
        /// </summary>
        public Nullable<int> PurchasePeriod { get; set; }
        /// <summary>
        /// 商品金额
        /// </summary>
        public decimal CommodityMoney { get; set; }
        /// <summary>
        /// 折后金额
        /// </summary>
        public decimal DiscountMoney { get; set; }
        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal PreferentialAmount { get; set; }
        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal PaymentAmount { get; set; }
        /// <summary>
        /// 付款方式;1(金币)、2(微信)、3(支付宝)
        /// </summary>
        public Nullable<int> PaymentMethod { get; set; }
        /// <summary>
        /// 付款时间
        /// </summary>
        public string PaymentTime { get; set; }
        /// <summary>
        /// 确认时间
        /// </summary>
        public string ConfirmTime { get; set; }
        /// <summary>
        /// 截止时间
        /// </summary>
        public string EndTime { get; set; }
        /// <summary>
        /// 订单状态;1(等待买家付款)、(2买家已付款)、4(交易成功)、5(交易关闭)、6(退款中)
        /// </summary>
        /// <remarks>
        /// 20191112;老谭说去掉3(卖家已确认)
        /// </remarks>
        public Nullable<int> OrderState { get; set; }
        /// <summary>
        /// 订单来源;pc、web、mobile、wechat
        /// </summary>
        public string OrderSource { get; set; }
        /// <summary>
        /// 支付流水号
        /// </summary>
        public string PaymentCode { get; set; }
        /// <summary>
        /// 提单人
        /// </summary>
        public string OrderSubmitUser { get; set; }


        #region 需求《2021-9-14：添加需求《VLions需求规格_度度圈接口需求_订单及购物车-202100909.docx》的相关内容》添加的内容

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 所在地区
        /// </summary>
        public string Area { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 桌号
        /// </summary>
        public string TableNum { get; set; }

        #endregion
    }
}
